package com.ywu.tenant.spi.spi;

import com.ywu.common.result.CommonResult;
import com.ywu.tenant.spi.dto.TenantDto;
import com.ywu.tenant.spi.dto.TenantUserDTO;
import com.ywu.tenant.spi.entity.TenantEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "YWU-TENANT")
public interface TenantSpi {
    @PostMapping("/ywu/tenant/tenant.info.by.user.id.spi")
    CommonResult<List<TenantEntity>> queryTenantInfoByUserId(@RequestBody TenantUserDTO tenantUserDTO);

    @PostMapping("/ywu/tenant/tenant.info.by.tenant.id.spi")
    CommonResult<TenantEntity> queryTenantInfoByTenantId(@RequestBody TenantDto tenantDto);

    @PostMapping("/ywu/tenant/tenant.info.delete.by.user.id.for.spi")
    CommonResult<Object> deleteTenantPermission(@RequestBody TenantUserDTO tenantUserDTO);
}
